package com.peng.test;

import java.util.Arrays;

/**
 * Ascii2Char
 *
 * @author: lupeng6
 * @create: 2020/12/28 16:49
 */
public class Ascii2Char {

    public static void main(String[] args) {
        String str = "asjdfjasndfklngjn";
        int[] arr = new int[str.length()];
        for (int i = 0; i < str.length(); i++) {
            arr[i] = str.charAt(i) - 'a';
        }
        Arrays.stream(arr).forEach(System.out::println);

        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < arr.length; i++) {
            builder.append((char) (arr[i] + 'a'));
        }
        System.out.println(builder.toString());

        System.out.println((int) '0');
        System.out.println((int) '1');
    }
}
